/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class NoiseDetector {
    static categoryCode = '010030016';

    static categoryName = '噪声检测仪';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return NoiseDetector.categoryCode;
    }

    get categoryName() {
        return NoiseDetector.categoryName;
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'pDrhFb0C',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getNoiseFrequency(params) {
        return command({
            method: 'getNoiseFrequency',
            methodId: 'pdN7zslZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getNoiseValue(params) {
        return command({
            method: 'getNoiseValue',
            methodId: 'ptRS9DCd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSoundFrequency(params) {
        return command({
            method: 'getSoundFrequency',
            methodId: 'phEqKYSr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSoundValue(params) {
        return command({
            method: 'getSoundValue',
            methodId: 'pgh0mqcA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'p1vFjxhU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setClear(params) {
        return command({
            method: 'setClear',
            methodId: 'pGoxHGFw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'ppAXISn5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setStart(params) {
        return command({
            method: 'setStart',
            methodId: 'pUPQ8VRm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setStop(params) {
        return command({
            method: 'setStop',
            methodId: 'pZgRT3HP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH3nfPl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default NoiseDetector;
